package org.terrier.matching.models;

public class JM extends WeightingModel {
	
	public JM(){
		super();
		this.c = 0.6d;
	}

	public final String getInfo() {
		return "JM";
	}
	public double score(double tf, double docLength) {
		return keyFrequency * c*tf/docLength + (1-c)*termFrequency/numberOfTokens;
	}
	public double score(
			double tf,
			double docLength,
			double n_t,
			double F_t,
			double keyFrequency) {
		return keyFrequency * c*tf/docLength + (1-c)*termFrequency/numberOfTokens;
	}
}